package com.example.mxs.controller;

import com.alibaba.fastjson.JSONObject;
import com.example.mxs.domain.Menu;
import com.example.mxs.domain.User;
import com.example.mxs.service.MenuService;
import com.example.mxs.service.TokenService;
import com.example.mxs.service.UserService;
import com.example.mxs.token.UserLoginToken;
import com.example.mxs.util.MetaData;
import com.example.mxs.util.ResponseData;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@RestController
public class RightController {

    @Autowired
    MenuService menuService;

    @ApiOperation(value = "获取左侧菜单列表", notes = "获取左侧菜单列表")
    @GetMapping("/api/v1/menus")
    public ResponseData getUser() {
        ResponseData responseData= new ResponseData();
        List<Menu> menus=menuService.getMenus();
        responseData.setData(menus);
        responseData.setMeta(MetaData.CODE_200);
        return responseData;
    }





}
